<?php
namespace Home\Controller;

use Common\Controller\MemberbaseController;

class ConsultController extends MemberbaseController{
	
	protected $consult_model;
	
	public function _initialize() {
		parent::_initialize();
		$this->consult_model=D("Common/consult");
	}
	
	
	// 前台用户提交咨询
	public function post(){
		if(IS_POST){
			if ($this->consult_model->create()!==false) {
				if ($this->consult_model->add()!==false) {
					$this->success("添加成功");
				} else {
					$this->error("添加失败！");
				}
			} else {
				$this->error($this->consult_model->getError());
			}
		}
	}
}